
    //先定义学生类
    class Student{
        String name;
        int age;
        String banji;
        String aihao;
        public void print(){
            System.out.println("姓名"+name);
            System.out.println("年龄"+age);
            System.out.println("班级"+banji);
            System.out.println("爱好"+aihao);
        }
    }
    //定义教师类
    class Teacher{
        String name;
        int jiaoling;
        String zhuanye;
        String kecheng;
        public void print(){
            System.out.println("姓名"+name);
            System.out.println("教龄"+jiaoling+"年");
            System.out.println("专业方向"+zhuanye);
            System.out.println("教授课程"+kecheng);
        }
    }
    public class People {
    public static void main(String[] args) {
       Student a=new Student();
       Teacher b=new Teacher();
       a.name="汤舒青";
       a.age=27;
       a.banji="java78";
       a.aihao="敲代码";
       b.name="刘老师";
       b.jiaoling=5;
       b.zhuanye="计算机";
       b.kecheng="使用java语言高级逻辑";
       a.print();
       b.print();




    }
}